<?php
require_once "../funciones.php";
$link_caweb = con_caweb();

$q=$_POST["q"];
$link_caweb = con_caweb();

$result ="SELECT * FROM taxonomia WHERE codigosubclase='$q' GROUP BY familia";
$result= mysql_query($result,$link_caweb) or die('Error taxonomia, '.mysql_error());
?>        

Familia: <select name="familia" size="1" id="familia" onchange="
$('#codigoitem').attr('value',this.value);
$('#grupo').load('crea_item_grupo.php',{q:this.value});
">

<option value='XXX' SELECTED>Seleccionar..</option>
<?
    while($row = mysql_fetch_array($result))
    {
        ?> <option value="<? echo $row["familia"]; ?>" >  <? echo $row["familia"]." -> ".$row["descripcionfam"]; ?> </option> <?
    }
    echo "</select>";
?>